package com.richstonedt.smartcity.xaytsccommonrs.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.*;

@RefreshScope
@RestController
@RequestMapping("/test")
public class NacosConfigController
{
        @Value("${user.name}")
        private String name;

        @GetMapping("/getNacosConfig")
        public String providerTest()
        {
            String ss="我是provider，已成功获取nacos配置中心的数据：name is ".concat(name);
            return ss;
        }
 }